# force C++17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set (EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

aux_source_directory (${PROJECT_SOURCE_DIR}/src SRC_LIST)

include_directories (${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/include/hins ${PROJECT_SOURCE_DIR}/include/LLSInterface)

# 
find_package(Poco REQUIRED COMPONENTS Foundation Net JSON)
# 

set(Boost_USE_STATIC_LIBS        ON)  # only find static libs
set(Boost_USE_DEBUG_LIBS        OFF)  # ignore debug libs and
set(Boost_USE_RELEASE_LIBS       ON)  # only find release libs
set(Boost_USE_MULTITHREADED      ON)
set(Boost_USE_STATIC_RUNTIME    OFF)
find_package(Boost COMPONENTS date_time filesystem system thread asio program_options)
# find_package(Boost 1.71 COMPONENTS date_time filesystem system thread asio)

include_directories(${Boost_INCLUDE_DIRS} ${Poco_INCLUDE_DIRS})
add_executable(${PROJECT_NAME} ${SRC_LIST})
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} ${Poco_LIBRARIES})

# if(Boost_FOUND)
#   include_directories(${Boost_INCLUDE_DIRS})
#   add_executable(hins ${SRC_LIST})
#   target_link_libraries(hins ${Boost_LIBRARIES})
# endif()

install(
    TARGETS ${PROJECT_NAME}
    RUNTIME DESTINATION bin
)